home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
icon
/
packages.lha
/
packages
/
atari
/
ats.arc
/
STAND.ARC
/
STRUCT.OUT
< prev
next >
Wrap
Text File
|
1990-03-28
|
6KB
|
359 lines
----> &null
list(0) ----> list_2(0)
list(0,1) ----> list_3(0)
list(1,1) ----> list_4(1)
list(100,"a") ----> list_5(100)
table() ----> table_1(0)
table(0) ----> table_2(0)
a := [] ----> list_6(0)
every put(a,!&lcase) ----> none
a1 := sort(a) ----> list_7(26)
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
every write(!a1) ----> none
sort(a1) ----> list_8(26)
t := table() ----> table_3(0)
every t[!&lcase] := 1 ----> none
sort(t) ----> list_9(26)
a := sort(t) ----> list_36(26)
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
every write((!a)[1]) ----> none
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
every write((!a)[2]) ----> none
set([1,0,1,0,1,0,1,0]) ----> set_1(2)
set([]) ----> set_2(0)
s := set([1,2,3,4,5,6,7,8,9,10]) ----> set_3(10)
*s ----> 10
1
2
3
4
5
6
7
8
9
10
every write(!sort(s)) ----> none
*copy(s) ----> 10
image(s) ----> "set_3(10)"
type(s) ----> "set"
member(s,8) ----> 8
member(s,"8") ----> none
s := set([]) ----> set_5(0)
every insert(s,1 to 100) ----> none
*s ----> 100
every delete(s,15 to 30) ----> none
*s ----> 84
every s1 := insert(set([]),!&lcase) ----> none
s2 := set(["a","aa","ab","b",1,2,3,4]) ----> set_7(8)
s3 := s1 ++ s2 ----> set_8(32)
s4 := s1 ** s2 ----> set_9(2)
s5 := s1 -- s2 ----> set_10(24)
*s3 ----> 32
*s4 ----> 2
*s5 ----> 24
t := table() ----> table_4(0)
every t[1 | &output | &cset | [] | "hello" | main | 2 | table()] := ?100 ----> none
a := sort(t,3) ----> list_71(16)
1 22
2 8
"hello" 43
&cset 32
&output 42
procedure main 31
list_70(0) 52
table_5(0) 74
every i := 1 to *a - 1 by 2 do write(image(a[i])," ",a[i + 1]) ----> none
a := sort(t,4) ----> list_72(16)
2 8
1 22
procedure main 31
&cset 32
&output 42
"hello" 43
list_70(0) 52
table_5(0) 74
every i := 1 to *a - 1 by 2 do write(image(a[i])," ",a[i + 1]) ----> none
t := table() ----> table_6(0)
every t[1 | &output | &cset | [] | "hello" | main | 2 | table()] := ?100 ----> none
a := sort(t,3) ----> list_74(16)
1 6
2 58
"hello" 54
&cset 14
&output 72
procedure main 63
list_73(0) 34
table_7(0) 71
every i := 1 to *a - 1 by 2 do write(image(a[i])," ",a[i + 1]) ----> none
a := sort(t,4) ----> list_75(16)
1 6
&cset 14
list_73(0) 34
"hello" 54
2 58
procedure main 63
table_7(0) 71
&output 72
every i := 1 to *a - 1 by 2 do write(image(a[i])," ",a[i + 1]) ----> none
x := [array(),table(),write,[],&input,1,"abc",'aa',&null] ----> list_77(9)
x := sort(x) ----> list_78(9)
&null
1
"abc"
'a'
&input
function write
list_76(0)
table_8(0)
record array_1(7)
every write(image(!x)) ----> none
t := table(table()) ----> table_10(0)
table_10(1)
table_10(2)
table_10(3)
table_10(4)
table_10(5)
table_10(6)
table_10(7)
table_10(8)
table_10(9)
table_10(10)
every t[1 to 10] := 1 do write(image(t)) ----> none
t := table() ----> table_11(0)
1
2
3
4
5
6
7
8
9
10
every t[1 to 10] := 1 do write(*t) ----> none
t[] := 6 ----> 6
t[] ----> 6
*t ----> 11
t[&null] := 7 ----> 7
t[] ----> 7
*t ----> 11
x := [] ----> list_79(0)
*x ----> 0
every push(x,1 to 10) ----> none
10
9
8
7
6
5
4
3
2
1
every 1 to 10 do write(pop(x)) ----> none
*x ----> 0
pop(x) ----> none
pull(x) ----> none
get(x) ----> none
every put(x,1 to 10) ----> none
1
2
3
4
5
6
7
8
9
10
every 1 to 10 do write(get(x)) ----> none
every push(x,1 to 10) ----> none
1
2
3
4
5
6
7
8
9
10
every 1 to 10 do write(pull(x)) ----> none
x := [1,2,3,4,5,6,7,8,9,0] ----> list_80(10)
list_81(10)
list_82(9)
list_83(8)
list_84(7)
list_85(6)
list_86(5)
list_87(4)
list_88(3)
list_89(2)
list_90(1)
list_91(0)
every write(image(x[1:0 to -20 by -1])) ----> none
a := [1,2,3,4,5,6,7,8] ----> list_92(8)
a1 := a[2:4] ----> list_93(2)
a2 := a[7:2] ----> list_94(5)
a3 := a[2+:3] ----> list_95(3)
a4 := a[-1-:3] ----> list_96(3)
a1[1] ----> 2
a2[1] ----> 2
a3[1] ----> 2
a4[1] ----> 5
a4[1] := a ----> list_92(8)
a := [1,2,3,4] ----> list_97(4)
a1 := a[1:2] ----> list_98(1)
1
every write(!a1) ----> none
a2 := a[3:0] ----> list_99(2)
3
4
every write(!a2) ----> none
a4 := a[2:2] ----> list_100(0)
every write(!a4) ----> none
a5 := a[0-:2] ----> list_101(2)
3
4
every write(!a5) ----> none
a3 := a[0:3] ----> list_102(2)
3
4
every write(!a3) ----> none
a := "abcd" ----> "abcd"
a1 := a[1:2] ----> "a"
a
every write(!a1) ----> none
a2 := a[3:0] ----> "cd"
c
d
every write(!a2) ----> none
a3 := a[0:3] ----> "cd"
c
d
every write(!a3) ----> none
a4 := a[2:2] ----> ""
every write(!a4) ----> none
a5 := a[0-:2] ----> "cd"
c
d
every write(!a5) ----> none
[] ||| [] ----> list_105(0)
[1,2,3] ||| [] ----> list_109(3)
[] ||| [1,2,3] ----> list_113(3)
r := array(1,2,3,4,5,6,7,8,9) ----> record array_2(7)
r.a ----> 1
r.b ----> 2
r.c ----> 3
r.d ----> 4
r.e ----> 5
r.f ----> 6
type(r) ----> "array"
image(r) ----> "record array_2(7)"
r.a +:= 0 ----> 1
r.b +:= 0 ----> 2
r.c +:= 0 ----> 3
r.d +:= 0 ----> 4
r.e +:= 0 ----> 5
r.f +:= 0 ----> 6
r.a ----> 1
r.b ----> 2
r.c ----> 3
r.d ----> 4
r.e ----> 5
r.f ----> 6
r := array("a",2,array(),r,main) ----> record array_4(7)
"a"
2
3.5
record array_3(7)
record array_2(7)
procedure main
&null
every write(image(!r)) ----> none
r[1] :=: r.d ----> record array_3(7)
record array_3(7)
2
3.5
"a"
record array_2(7)
procedure main
&null
every write(image(!r)) ----> none